5.3.3 APPX Application Design Manual

+ Chapter 1-1: Overview of Application Design
+ Chapter 1-2: Getting Started
+ Chapter 1-3: Data Dictionary
+ Chapter 1-4: Understanding Process Design
+ Chapter 1-5: Interprocess Communication
+ Chapter 1-6: Customizing Your Application
+ Chapter 1-7: The Documentation Facility
+ Chapter 1-8: Application Design Tools
+ Chapter 2-1: Data Dictionary Overview
+ Chapter 2-2: Data Dictionary Concepts
+ Chapter 2-3: Domains
+ Chapter 2-4: Files and Fields
+ Chapter 2-5: Work Fields
+ Chapter 3-1: Overview of APPX Processes
+ Chapter 3-2: Getting Started
+ Chapter 3-3: Process Definition
+ Chapter 3-4: Menu Processes
+ Chapter 3-5: Job Processes
+ Chapter 3-6: Input Processes
+ Chapter 3-7: Output Processes
+ Chapter 3-8: Update Processes
+ Chapter 3-9: Query Processes
+ Chapter 3-10: Inquiry Processes
+ Chapter 3-11: Status Processes
+ Chapter 3-12: Subroutine Processes
+ Chapter 3-13: Table Processes
+ Chapter 3-14: Automatic and Optional Children
+ Chapter 3-15: Using the Image Editor
+ Chapter 3-16: Using GUI Features of the Image Editor
+ Chapter 3-17: Using Event Points
+ Chapter 4-1: ILF Integration
+ Chapter 4-2: True/False Status Indicators
+ Chapter 4-3: Specifying Statements
+ Chapter 4-4: The ILF Editor
+ Chapter 4-5: The Appx ILF Debugger
- Chapter 4-6: ILF Keyword Reference
+ Chapter 4-7: Predefined Fields
+ Chapter 4-8: Runtime Subroutine's and Predefined Processes
+ Chapter 4-9: Appx Chart Director API

Chapter 4-6: ILF Keyword Reference

OVERFLOW


The OVERFLOW statement provides a means for intercepting numeric overflow conditions which can be caused by division by zero or by a result too large to be stored in a numeric destination field. The OVERFLOW statement specifies a label in much the same manner as a GOTO statement.

    ????? OVERFLOW ??????????????????????????????
    (1)            (2)

(1) T/F execution conditions
(2) Label

Using the Statement

If a statement subsequent to the OVERFLOW statement references a numeric field and causes an overflow condition, processing control is transferred to the statement immediately following the specified label. The LABEL statement referenced by the OVERFLOW statement can be anywhere in the same event point as the OVERFLOW.

The OVERFLOW statement may be respecified at any time with another label, or the intercept may be disabled by an OVERFLOW statement with no label specified. Intercepts are automatically disabled when the event point that they are contained in is complete.

Compilation Errors

A process compile error occurs if the referenced LABEL is not defined within the same event point as the OVERFLOW statement, and also not defined in any ILF subroutines copied into the event point with the COPY statement.

Related Statements

CALC, COMPUTE, COPY, LABEL, SET, SET TOT

Example

In the following example, the OVERFLOW statement prevents the event point from failing with an overflow condition caused either by WORK AVG SALES not being large enough to store the integer component of WORK TOTAL SALES or by a division by zero error should the number of salesreps be zero. 

          OVERFLOW :WORK AVG SALES OVERFLOW
          SET      TAR WORK AVG SALES             =  TAR WORK TOTAL SALES
          COMPUTE  TAR WORK AVG SALES             /  TAR WORK NO SALESREPS
          GOTO     :DISPLAY RESULTS
          *
          LABEL    :WORK AVG SALES OVERFLOW
          SET      TAR WORK AVG SALES             =      0
          WARNING  Numeric Overflow - WORK AVG SALES set to zero!
          *
          LABEL    :DISPLAY RESULTS
          DISPLAY  TAR WORK AVG SALES

Application Design Manual                                         "Powered by Appx Software"

673

©2006 By APPX Software, Inc. All Rights Reserved